<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>陆老师小课堂</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bg-light-gray">
      <div class="content">
        <header class="bar bar-nav dark-header">
          <a href="${ctx.host}" class="icon icon-left pull-left" style="color: #fff;"></a>
          <h1 class="title">我的训练</h1>
        </header>
        <div class="content" style="background-color: #FFF;">
          <div class="list-block">
            <div style="height: 6.5rem; margin: 0 auto; text-align: center;">
              <img style="width: 3rem; height: 3rem;" alt="" src="${ctx.resource}/images/edooschool.png">
              <p class="text-center" style="margin: 0px; font-size: .8rem; color: #999;">陆老师小课堂</p>
            </div>
            <ul>
              <c:forEach var="record" items="${records}">
                <li>
                  <a class="item-content item-link" href="${ctx.host}/rounds/${record.oralRound.id}/records/${record.oralRound.id}">
                    <div class="item-media"><i class="fa fa-pencil" aria-hidden="true"></i></div>
                    <div class="item-inner">
                      <div class="item-title-row">
                        <div class="item-title">${record.oralRound.name}</div>
                        <%-- <div class="item-after">
                          <fmt:formatDate value="${record.createTime}" pattern="yyyy-MM-dd mm:ss"/>
                        </div> --%>
                      </div>
                      <div class="item-subtitle">
                        <div class="star-group">
                          <c:forEach begin="1" end="3" varStatus="status">
                            <i class="star ${status.index <= record.stars ? 'active' : ''}"></i>
                          </c:forEach>
                        </div>
                      </div>
                    </div>
                  </a>
                </li>
              </c:forEach>
            </ul>
          </div>
          <p style="text-align: center; font-size: .6rem; color: #999;">陆老师小课堂（微信号：llsxkt）出品</p>
        </div>
      </div>
    </div>
  </div>
  
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/oral/record.js" />
  <script type="text/javascript">
      require(['page/oral/record'], function(page) {
        page.init({
          jsConfig: JSON.parse('${jsConfig}')
        });
      })
  </script>
  
</body>
</html>